Give more-useful info on a fatal error (Bug#12328).
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Sep 2012 18:29:04 +0000 (11:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Sep 2012 18:29:04 +0000 (11:29 -0700)
commit7c79c3bf14b9d4d38fbfb18e875b1ed2600dfac6
treeaa2a6f32a92d0ef0b5d2f470881a8712634548ea
parent21c042bf50d9767149332ed3c610b1ffee743ec3
Give more-useful info on a fatal error (Bug#12328).

* doc/emacs/trouble.texi (Crashing): New section, documenting this.
* etc/NEWS: Document the change.
* src/alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
(die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
of doing the work ourselves.
* src/emacs.c (fatal_error_signal): Let fatal_error_backtrace
do most of the work.
(fatal_error_backtrace): New function, taken from the guts
of the old fatal_error_signal, but with a new option to output
a backtrace.
(shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
info about the signal than just its number.
* src/lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
* src/sysdep.c: Include <execinfo.h>
(emacs_backtrace): New function, taken partly from the previous
code of the 'die' function.
(emacs_abort): Call fatal_error_backtrace rather than abort.
doc/emacs/ChangeLog
doc/emacs/emacs.texi
doc/emacs/trouble.texi
etc/ChangeLog
etc/NEWS
src/ChangeLog
src/alloc.c
src/emacs.c
src/lisp.h
src/sysdep.c